<template>
    <!--  分包商年度信用评价表-->
    <div class="e-table">
        <h2 style="text-align: center">分包商年度信用评价表</h2>
        <div>
            <div
                style="
                    display: flex;
                    justify-content: space-between;
                    margin-bottom: 10px;
                "
            >
                <div style="margin-left: 20px">
                    共 <span>{{ tableData.length }}</span> 条
                </div>
                <div style="display: flex">
                    <div>
                        <el-input
                            placeholder=""
                            v-model="parameter.keyword"
                            size="small"
                        >
                            <i slot="suffix" class="el-icon-search like"></i>
                        </el-input>
                    </div>
                    <div>
                        <el-button
                            size="small"
                            style="background: #2e61d7; color: #fff"
                            >高级搜索</el-button
                        >
                    </div>
                </div>
            </div>
            <el-table
                ref="table"
                :max-height="$store.state.tableHeight"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
                class="table"
                :header-cell-style="{ textAlign: 'center' }"
                :cell-style="{ textAlign: 'center' }"
                @selection-change="handleSelectionChange"
                v-sortTable="{
                    tableData: tableData,
                    _this: this,
                    ref: 'table'
                }"
            >
                <el-table-column type="index" label="序号" width="60">
                </el-table-column>
                <el-table-column label="合同编号" min-width="150">
                    <template slot-scope="scope">{{
                        scope.row.contractNo
                    }}</template>
                </el-table-column>
                <el-table-column
                    prop="contractName"
                    label="合同名称"
                    min-width="150"
                >
                </el-table-column>
                <el-table-column
                    prop="contractType"
                    label="合同类型"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="contractDate"
                    label="签订日期"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="contractTerminationDate"
                    label="终止日期"
                    width="150"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="contractCloseDate"
                    label="结案日期"
                    min-width="150"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="outerName"
                    label="分包商名称"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="year"
                    label="评价年度"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="firstQuarter"
                    label="第一季度"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="secondQuarter"
                    label="第二季度"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="thirdQuarter"
                    label="第三季度"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>

                <el-table-column
                    prop="fourthQuarter"
                    label="第四季度"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="shouldNum"
                    label="应评次数"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="score"
                    label="评价分数"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="orgName"
                    label="评价单位"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="contractAmount"
                    label="合同金额"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="isGuarantee"
                    label="是否提供履约担保"
                    width="150"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    prop="legalRepresentative"
                    label="法定代表人"
                    width="120"
                    show-overflow-tooltip
                >
                </el-table-column>
            </el-table>
        </div>
        <div class="list"></div>
    </div>
</template>
<script>
import subcontractorRAP from '@/api/OutsourcingartyAdmin/subcontractorAdmin/subcontractorRAP.js'
export default {
    data () {
        return {
            tableData: [],
            parameter: {
                keyword: '',
                limit: 10,
                orgId: '',
                page: 1,
                states: []
            }
        }
    },
    created () {
        this.getData()
    },
    mounted () {},
    methods: {
        //查询分包商列表数据
        async getData () {
            this.tableData = await subcontractorRAP.annualCreditEvaluationForm(
                this.parameter
            )
        },

        handleSelectionChange (val) {
            this.multipleSelection = val
        }
    }
}
</script>
<style lang="scss" scoped></style>
